<%@ Page Title="" Language="C#" MasterPageFile="~/SiteUser.master" AutoEventWireup="true"
    CodeFile="CreateCustomer.aspx.cs" Inherits="carinsurance_CreateCustomer" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <h1>
        Create Customer Account
        <fieldset>
            <dl>
                <dt>
                    <label>
                        First Name</label></dt>
                <dd>
                    <asp:TextBox ID="txtFirstName" Width="230" MaxLength="50" runat="server"></asp:TextBox>
                    <asp:RegularExpressionValidator ID="revFirstName" runat="server" ValidationGroup="customer"
                        ValidationExpression="^[a-zA-Z''-'\s]{1,50}$" ControlToValidate="txtFirstName"
                        Text="Invalid first name." ErrorMessage="Invalid first name."></asp:RegularExpressionValidator></span>
                </dd>
            </dl>
            <dl>
                <dt>
                    <label>
                        Surname</label></dt>
                <dd>
                    <asp:TextBox ID="txtSurName" Width="230" MaxLength="50" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvSurName" runat="server" ValidationGroup="customer"
                        ErrorMessage="Require Surname." Text="" Display="Dynamic" ControlToValidate="txtSurName"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="revSurname" runat="server" ValidationGroup="customer"
                        ValidationExpression="^[a-zA-Z''-'\s]{1,50}$" Text="Invalid Surname." ControlToValidate="txtSurName"
                        ErrorMessage="Invalid Surname."></asp:RegularExpressionValidator>
                </dd>
            </dl>
            <dl>
                <dt>
                    <label>
                        Email</label></dt>
                <dd>
                    <asp:TextBox ID="txtEmailAddress" runat="server" MaxLength="100" Width="230"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvEmail" runat="server" Text="Require Email address."
                        Display="Dynamic" ValidationGroup="customer" ToolTip="By inputting your email address here, CompareXpress will create a new user account automatically for you."
                        ErrorMessage="" ControlToValidate="txtEmailAddress"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="revEmail" Text="Invalid Email address." runat="server"
                        ValidationGroup="customer" ErrorMessage="" ControlToValidate="txtEmailAddress"
                        ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" Display="Dynamic"></asp:RegularExpressionValidator>
                    <asp:Button runat="server" Text="Check" ID="btnCheckEmailAddress" OnClick="btnCheckEmailAddress_Click" />
                    <asp:TextBox ID="txtIps" runat="server"></asp:TextBox>
                    <asp:Label ID="lblEmailStatus" runat="server"></asp:Label>
                </dd>
            </dl>
            <dl>
                <dt>
                    <label>
                        Mobile</label></dt>
                <dd>
                    <asp:TextBox ID="txtMobileNo" Width="100" MaxLength="8" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvMobile" runat="server" ValidationGroup="customer"
                        ErrorMessage="Require Mobile number." Text="" ControlToValidate="txtMobileNo"
                        Display="Dynamic"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="revMobile" runat="server" ValidationGroup="customer"
                        ValidationExpression="\d{8}" Text="Invalid Mobile number." ControlToValidate="txtMobileNo"
                        ErrorMessage="Invalid Mobile number."></asp:RegularExpressionValidator>
                </dd>
            </dl>
            <dl>
                <dt>
                    <label>
                        Gender</label></dt>
                <dd>
                    <asp:DropDownList ID="ddlGender" runat="server">
                        <asp:ListItem Value="NA" Text="Select"></asp:ListItem>
                        <asp:ListItem Value="M" Text="Male"></asp:ListItem>
                        <asp:ListItem Value="F" Text="Female"></asp:ListItem>
                    </asp:DropDownList>
                    <asp:RequiredFieldValidator ID="rfvGender" runat="server" ValidationGroup="customer"
                        ErrorMessage="Require Gender." InitialValue="NA" Text="Require Gender." ControlToValidate="ddlGender"></asp:RequiredFieldValidator>
                </dd>
            </dl>
            <dl>
                <dt>
                    <label>
                        Date of Birth</label>
                </dt>
                <dd>
                    <asp:DropDownList ID="ddlDay" runat="server" ToolTip="Choose Day">
                        <asp:ListItem Value="-1">Day</asp:ListItem>
                        <asp:ListItem Value="1">01</asp:ListItem>
                        <asp:ListItem Value="2">02</asp:ListItem>
                        <asp:ListItem Value="3">03</asp:ListItem>
                        <asp:ListItem Value="4">04</asp:ListItem>
                        <asp:ListItem Value="5">05</asp:ListItem>
                        <asp:ListItem Value="6">06</asp:ListItem>
                        <asp:ListItem Value="7">07</asp:ListItem>
                        <asp:ListItem Value="8">08</asp:ListItem>
                        <asp:ListItem Value="9">09</asp:ListItem>
                        <asp:ListItem>10</asp:ListItem>
                        <asp:ListItem>11</asp:ListItem>
                        <asp:ListItem>12</asp:ListItem>
                        <asp:ListItem>13</asp:ListItem>
                        <asp:ListItem>14</asp:ListItem>
                        <asp:ListItem>15</asp:ListItem>
                        <asp:ListItem>16</asp:ListItem>
                        <asp:ListItem>17</asp:ListItem>
                        <asp:ListItem>18</asp:ListItem>
                        <asp:ListItem>19</asp:ListItem>
                        <asp:ListItem>20</asp:ListItem>
                        <asp:ListItem>21</asp:ListItem>
                        <asp:ListItem>22</asp:ListItem>
                        <asp:ListItem>23</asp:ListItem>
                        <asp:ListItem>24</asp:ListItem>
                        <asp:ListItem>25</asp:ListItem>
                        <asp:ListItem>26</asp:ListItem>
                        <asp:ListItem>27</asp:ListItem>
                        <asp:ListItem>28</asp:ListItem>
                        <asp:ListItem>29</asp:ListItem>
                        <asp:ListItem>30</asp:ListItem>
                        <asp:ListItem>31</asp:ListItem>
                    </asp:DropDownList>
                    <asp:DropDownList ID="ddlMonth" runat="server" ToolTip="Choose Month">
                        <asp:ListItem Value="-1">Month</asp:ListItem>
                        <asp:ListItem Value="1">January</asp:ListItem>
                        <asp:ListItem Value="2">February</asp:ListItem>
                        <asp:ListItem Value="3">March</asp:ListItem>
                        <asp:ListItem Value="4">April</asp:ListItem>
                        <asp:ListItem Value="5">May</asp:ListItem>
                        <asp:ListItem Value="6">June</asp:ListItem>
                        <asp:ListItem Value="7">July</asp:ListItem>
                        <asp:ListItem Value="8">August</asp:ListItem>
                        <asp:ListItem Value="9">September</asp:ListItem>
                        <asp:ListItem Value="10">October</asp:ListItem>
                        <asp:ListItem Value="11">November</asp:ListItem>
                        <asp:ListItem Value="12">December</asp:ListItem>
                    </asp:DropDownList>
                    <asp:DropDownList ID="ddlYear" runat="server" ToolTip="Choose Year">
                        <asp:ListItem Value="-1">Year</asp:ListItem>
                    </asp:DropDownList>
                    <asp:RequiredFieldValidator ID="rfvDay" ControlToValidate="ddlDay" runat="server"
                        Display="Dynamic" ErrorMessage="Require Day." ValidationGroup="customer" Text="Require Day."
                        InitialValue="-1"></asp:RequiredFieldValidator>
                    <asp:RequiredFieldValidator ID="rfvMonth" ControlToValidate="ddlMonth" runat="server"
                        ErrorMessage="Require Month." ValidationGroup="customer" Text="Require Month."
                        Display="Dynamic" InitialValue="-1"></asp:RequiredFieldValidator>
                    <asp:RequiredFieldValidator ID="rfvYear" ControlToValidate="ddlYear" runat="server"
                        ErrorMessage="" Text="Require Year." ValidationGroup="customer" InitialValue="-1"></asp:RequiredFieldValidator>
                    <asp:CustomValidator Text="Invalid DOB." ErrorMessage="Invalid DOB." ID="csvDOB"
                        runat="server" ValidationGroup="customer" ControlToValidate="ddlDay" />
                </dd>
            </dl>
            <dl>
                <dt>
                    <label>
                        Occupation</label></dt>
                <dd>
                    <asp:DropDownList ID="ddlOccupation" runat="server">
                        <asp:ListItem Value="-1" Text="Select"></asp:ListItem>
                    </asp:DropDownList>
                    <asp:RequiredFieldValidator ID="rfvOccupation" runat="server" ValidationGroup="customer"
                        ErrorMessage="Require Occupation." InitialValue="-1" Text="Require Occupation."
                        ControlToValidate="ddlOccupation"></asp:RequiredFieldValidator>
                </dd>
            </dl>
            <dl>
                <dt>
                    <label>
                        Job Nature</label></dt>
                <dd>
                    <asp:DropDownList ID="ddlJobNature" runat="server">
                        <asp:ListItem Value="-1" Text="Select"></asp:ListItem>
                    </asp:DropDownList>
                    <asp:RequiredFieldValidator ID="rfvJobNature" runat="server" ValidationGroup="customer"
                        ErrorMessage="Require Job Nature." InitialValue="-1" Text="Require Job Nature."
                        ControlToValidate="ddlJobNature"></asp:RequiredFieldValidator>
                </dd>
            </dl>
            <dl>
                <dt>
                    <label>
                        Marital Status</label></dt>
                <dd>
                    <asp:DropDownList ID="ddlMaritalStatus" runat="server">
                        <asp:ListItem Value="-1" Text="Select"></asp:ListItem>
                    </asp:DropDownList>
                    <asp:RequiredFieldValidator ID="rfvMaritalStatus" runat="server" ValidationGroup="customer"
                        ErrorMessage="Require Marital Status." InitialValue="-1" Text="Require Marital Status."
                        ControlToValidate="ddlMaritalStatus"></asp:RequiredFieldValidator>
                </dd>
            </dl>
            <dl>
                <dt>
                    <label>
                        Years of Driving in Singapore</label></dt>
                <dd>
                    <asp:DropDownList ID="ddlYearDriveSg" runat="server">
                        <asp:ListItem Value="-1" Text="Select"></asp:ListItem>
                    </asp:DropDownList>
                    <asp:RequiredFieldValidator ID="rfvYearDriveSg" runat="server" ValidationGroup="customer"
                        ErrorMessage="Require Years of Driving in Singapore." InitialValue="-1" Text="Require Years of Driving in Singapore."
                        ControlToValidate="ddlYearDriveSg"></asp:RequiredFieldValidator>
                </dd>
            </dl>
            <dl>
                <dt>
                    <label>
                        <span style="color: White">Dummy label</span>
                    </label>
                </dt>
                <dd>
                    <asp:Button runat="server" ID="btnNewSubmit" Text="Submit" ValidationGroup="customer"
                        OnClick="btnNewSubmit_Click" />
                    <asp:Button runat="server" ID="btnNewSubmit0" Text="Submit" 
                        OnClick="btnNewSubmit_Click" />
                </dd>
            </dl>
            <dl>
                <dt>
                    <label>
                        <span style="color: White">Dummy label</span>
                    </label>
                </dt>
                <dd>
                    <asp:Label runat="server" ID="lblMessage" Text="Message" ForeColor="Blue" Font-Bold="true" />
                </dd>
            </dl>
        </fieldset>

        <script type="text/javascript">

            document.getElementById('<%=lblMessage.ClientID%>').innerHTML = 'Testing';
            document.getElementById('<%=lblMessage.ClientID%>').disabled = true;
            alert(document.getElementById('<%=lblMessage.ClientID%>').innerText);
        </script>
</asp:Content>
